<include file="../Public:header" />
<block name="css"></block>
<title><block name='title'></block></title>
</head>
<body>
<block name='nav'></block>
<div class="page-container">
    <block name='body'></block>
</div>
<include file="../Public:footer" />
<script type="text/javascript" src="__PUBLIC_LIB__/Validform/Validform.min.js?v=5.3.2"></script>
<script>
    //公共form ajax返回处理
    $(function(){
        ajaxForm('#form-ajax-Form');
    });

    var ajaxForm=function(slt,fuc){
        if(fuc==undefined||fuc==null){
            fuc=close_win;
        }
        $(slt).Validform({
            'tiptype':4,
            'ajaxPost':true,
            callback:function(d){
                if(d.status==1){
                    alert_success(d.info,fuc);
                }else{
                    alert_error(d.info);
                }
                return false;
            }
        });
    }
    var alert_error=function (msg,fuc) {
        layer.msg(msg, {icon: 2},fuc);
    };
    var alert_success=function (msg,fuc) {
        layer.msg(msg, {icon: 1},fuc);
    };
    var close_win=function () {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.location.reload();
        parent.layer.close(index);
    };
</script>
<block name="js"></block>
</body>
</html>